<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        // var age = 12;
        // console.log(age);//数字型
        // var name = "哈哈"
        // console.log(name);//字符串
        // console.log(1 > 2);
        // console.log(3 > 2);
        // var a;
        // console.log(a);
        /* var b = undefined;
        console.log(b);
        var z = null;
        console.log(z);
        var a = 0 || 7;
        console.log(a); //7 */
        // 判断年龄
        var a = prompt('请输入你的年龄');
        if (a >= 18) {
            alert('允许进入网吧');
        }
        else {
            alert('不允许');
        }
    </script>
</body>

</html>